<?php
/**
 * Created by PhpStorm.
 * User: apple
 * Date: 2018/7/21
 * Time: 下午5:09
 */

namespace PddWechat\Models\Pos\Service;
use Dai\Framework\Base\BaseService;
use Dai\Framework\Base\BaseSessionInfo;

class Index extends BaseService {

    /**
     * @param $basePageInfo
     */
    public function execute($basePageInfo) {
        /** @var BaseSessionInfo $sessionData */
        $sessionData = $basePageInfo->sessionInfo;
        $openid = $sessionData->openId;
        $url = "http://pdd.keepfoolish.cn/index2.html?openid=" . $openid;
        header("Location: $url");
        exit;
    }
}